-- GENERATED SPELL FOR [Frostbringer] --


function spell0_30286(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(15063,pUnit)
pUnit:RegisterEvent('Sorts_30286', 8339, 1)
end

function spell1_30286(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(61462,pUnit)
pUnit:RegisterEvent('Sorts_30286', 8298, 1)
end

function spell2_30286(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(57825,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30286', 6000, 1)
end

function spell3_30286(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(61461,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30286', 6000, 1)
end

function spell4_30286(pUnit, Event) --@Icy Winds,Self--
pUnit:FullCastSpellOnTarget(56716,pUnit)
pUnit:RegisterEvent('Sorts_30286', 648, 1)
end

function Sorts_30286(pUnit, Event)
local choix_sorts_30286 = math.random(0, 4)
if choix_sorts_30286 == 0 then
pUnit:RegisterEvent('spell0_30286', 1, 1)
end
if choix_sorts_30286 == 1 then
pUnit:RegisterEvent('spell1_30286', 1, 1)
end
if choix_sorts_30286 == 2 then
pUnit:RegisterEvent('spell2_30286', 1, 1)
end
if choix_sorts_30286 == 3 then
pUnit:RegisterEvent('spell3_30286', 1, 1)
end
if choix_sorts_30286 == 4 then
pUnit:RegisterEvent('spell4_30286', 1, 1)
end
end

function mob30286_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30286', math.random(1500, 3000), 1)
end

function mob30286_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30286_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30286_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30286, 1, 'mob30286_Action')
RegisterUnitEvent(30286, 2, 'mob30286_Leave')
RegisterUnitEvent(30286, 3, 'mob30286_Kill')
RegisterUnitEvent(30286, 4, 'mob30286_Die')
